package cn.lyd.org.mapper;

import cn.lyd.base.mapper.BaseMapper;
import cn.lyd.org.domain.Department;
import cn.lyd.org.domain.Employee;
import cn.lyd.org.vo.EmployeeRoleVo;

import java.util.List;

public interface EmployeeMapper extends BaseMapper<Employee> {


    //查询部门树
    List<Department> deptTree();

    //通过名字查找
    Employee findByName(String empName);

    //添加员工角色中间表
    void addEmployeeRoleTable(Long employeeId, Long roleId);

    //删除t_employee_role表    通过employee_id删除
    void deletEmployeeRoleTableByEmpId(Long id);

    //查询每个员工拥有的角色集合
    List<EmployeeRoleVo> findRoleIdListFromEmpRoleTableByEmpIdList(List<Long> empIdList);

    //通过logininfoId查询员工
    Employee findByLogininfoId(Long id);

    //查询某个店铺下的员工
    List<Employee> findByShopId(Long id);




   /* //通过电话查找
    Employee findByPhone(String phone);

    //通过邮箱查找
    Employee findByEmail(String email);
*/

}
